package util;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;

public class LoginValidator {
	public boolean check(){
		Map<String,Object> sess = ActionContext.getContext().getSession();
		Long userId = (Long) sess.get("userid");
		if(userId==null){
			return false;
		}
		return true;		
	}
	
	public Long getUserIdFromSession(){
		Map<String,Object> sess = ActionContext.getContext().getSession();
		Long userId = (Long) sess.get("userid");
		return userId;
	}
}
